package com.kzw.service;

import java.util.List;

import com.kzw.dao.GoodsDao;
import com.kzw.entity.Goods;

import my.db.Page;

public class GoodsService {

	private GoodsDao dao = new GoodsDao();
	
	public Page<Goods> list(Page<Goods> page, String title) {
		return dao.findPage(page, title);
	}
	public List<Goods> findAll(){
		return dao.findAll();
	}
	
	public void delete(long id) {
		dao.delete(id);		
	}
	public void save(Goods goods) {
		dao.save(goods);
	}
	
	public Goods get(Long id) {
		return dao.get(id);
	}
	
	public void update(Goods goods) {
		dao.update(goods);
	}
}
